home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / dev / misc / Bump.lha / Bump / Install < prev    next >
Encoding:
Text File  |  1999-08-11  |  2.3 KB  |  93 lines

  1. ; Install script for Bump
  2. ; ©1999 Robin Cloutman
  3.  
  4. (set @default-dest "C:")
  5.  
  6. ;---------------------------------------------------------------------------
  7. ;(if (= @language "english)
  8. ;(
  9. (set #setup-text "Checking system and application...")
  10.  
  11. (set #dest-prompt "Where do you want to install Bump?\n(A new drawer will NOT be created)")
  12. (set #dest-help "This should be in your path somewhere.")
  13.  
  14. (set #cpu-prompt "Which version of Bump do you wish to install?")
  15. (set #cpu-help "Unless you have some reason to choose\na different version, best leave\nthis to the default version.\n(The 68000 version is safe for all cpu's)")
  16.  
  17. (set #install-prompt "Installing Bump...")
  18. (set #install-help "Blah...")
  19. ;)
  20. ;---------------------------------------------------------------------------
  21.  
  22. (if (= (exists "Bump") 0)(abort "ERROR - Cannot find Bump!!!"))
  23.  
  24. (welcome)
  25.  
  26. (complete 0)
  27.  
  28. (working #setup-text)
  29. (set #cpu (substr (database "cpu") 3 1))
  30. (set #patch 0)
  31. (set #max 0)
  32. (foreach "" "Bump.0?0(|.pch)" (
  33.     (set #chr (substr @each-name (- (strlen @each-name) 2) 1))
  34.     (if (= #chr "c")((set #patch 1)(set #chr (substr @each-name (- (strlen @each-name) 6) 1))))
  35.     (if (> #chr #max)(set #max #chr))
  36. ))
  37. (if (> #cpu #max)(set #cpu #max))
  38.  
  39. (complete 25)
  40.  
  41. (if (>= @user-level 2)
  42.     (set @default-dest
  43.         (askdir
  44.             (prompt #dest-prompt)
  45.             (help #dest-help)
  46.             (default @default-dest)
  47. )))
  48.  
  49. (complete 50)
  50.  
  51. (if (>= @user-level 1)(
  52.     (if (= #cpu 6)(set #cpu 5))
  53.     (if (> #cpu 0)(set #cpu (- #cpu 1)))
  54.     (set #cpu
  55.         (askchoice
  56.             (if (> #max 5)    (choices "68000" "68020" "68030" "68040" "68060")
  57.             (if (> #max 4)    (choices "68000" "68020" "68030" "68040")
  58.             (if (> #max 3)    (choices "68000" "68020" "68030")
  59.             (if (> #max 1)    (choices "68000" "68020")
  60.                                 (choices "68000")))))
  61.             (default #cpu)
  62.             (prompt #cpu-prompt)
  63.             (help #cpu-help)
  64.     ))
  65.     (if (> #cpu 0)(set #cpu (+ #cpu 1)))
  66.     (if (= #cpu 5)(set #cpu 6))
  67. ))
  68. (set #file (cat "Bump.0" #cpu "0"))
  69. (if (= #patch 1)(if (= (exists (cat #file ".pch")) 1)(set #file (cat #file ".pch"))(set #patch 0)))
  70.  
  71. (complete 75)
  72.  
  73. (if (= #patch 0)
  74.     (copylib
  75.         (prompt #install-prompt)
  76.         (help #install-help)
  77.         (source #file)
  78.         (dest @default-dest)
  79.         (newname "Bump")
  80.     )
  81.     (run (cat "spatch -o" (tackon @default-dest "Bump") " -p" #file " Bump")
  82.         (prompt #install-prompt)
  83.         (help #install-help)
  84.         (confirm)
  85.     )
  86. )
  87.  
  88. (run "Copy Bump-#? S: QUIET")
  89.  
  90. (complete 100)
  91.  
  92. (exit)
  93.